/*
    Beginning DirectX 11 Game Programming
    By Allen Sherrod and Wendy Jones

    DX11Base Class - Base class for all demos to derive from.
*/


#ifndef DX11_BASE_H
#define DX11_BASE_H

#include"StdAfx.h"

class DX11Base
{
    public:
        DX11Base( );
        virtual ~DX11Base( );

        bool Init( HINSTANCE hInstance, HWND hwnd );
        void Shutdown( );

        virtual void Update( float dt ) = 0;
        virtual void Render( ) = 0;

    protected:
        HINSTANCE m_hInstance;
        HWND m_hwnd;

        D3D_DRIVER_TYPE m_driverType;
        D3D_FEATURE_LEVEL m_featureLevel;

        ID3D11Device* m_d3dDevice;
        ID3D11DeviceContext* m_d3dContext;
        IDXGISwapChain* m_swapChain;
        ID3D11RenderTargetView* m_backBufferTarget;

		unsigned int m_width;
		unsigned int m_height;
};

#endif